{include_core file="m/lib/header.html" type="set_newpass" title="设置密码" }
<div class="find-pwd-page">
  <div class="find-pwd">
  	<div class="step3">
          <h2 class="prompt">请重设您的账户密码</h2>
          <form action="{AnUrl('user/getback/get_success')}" method="post" id="js_submitBtn">
          <p class="txt-wrap"><input type="password" name="password" id="js_password" placeholder="新密码"/></p>
          <p class="txt-wrap"><input type="password" name="repassword" id="js_repassword" placeholder="确认密码"/></p>
          <div class="btns"><a href="javascript:void(0);" class="btn disabled submit-btn">提交</a></div>
          </form>
      </div>
  </div>
</div>
<script>
$(function(){
  $('.submit-btn').click(function(){
    var pass = $.trim($('#js_password').val());
    var repass = $.trim($('#js_repassword').val());
    if(pass == '') {
      mobileShowMsg('对不起，新密码不得为空');
      return ;
    }
    if(repass == '') {
      mobileShowMsg('对不起，确认密码不得为空');
      return ;
    }
    if(getStringLen(pass) < 6) {
      mobileShowMsg('对不起，密码最少要6位字符');
      return ;
    }
    if(getStringLen(pass) >= 20) {
      mobileShowMsg('对不起，密码最多要20位字符');
      return ;
    }
    if(pass != repass) {
      mobileShowMsg('对不起，两次输入密码不一致');
      return ;
    }
    $.post(
        "{AnUrl('user/getback/get_success')}",
        { 'password':pass, 'repassword':repass },
        function(data){
          if(data.info == 'error') {
            mobileShowMsg(data.msg);
            return;
          } else {
            $('#js_submitBtn').submit();        
          }
        },'json'
      );
  });
})
</script>
{include_core file="m/lib/footer.html" type="set_newpass" title="设置密码" }